"""import geohash as gh
import geo

prev = 0.0

for i in range( 50, 60 ): 
    print gh.encode( i/100.0, 1.1, 5 ) + " " + str(i/100.0) + " " + str( geo.angular_distance( prev, 1.1, i/100.0, 1.1 ) * 6371.01 )
    prev = i/10.0

for i in range( 350, 360 ): 
    print gh.encode( 49.1, i/10.0 , 5 ) + " " + str(i/10.0)
    print str( geo.distance_between_dec_coordinates_km( 49.1, prev, 49.1, i/10.0 ) )
    prev = i/10.0

print geo.distance_between_coordinates_km( ( 49, 5, 60.00 ), (34, 45, 8.91), (49, 5, 60.00), (34, 51, 5.35) )
"""

import geoindex as gi



idx1 = gi.Geoindex( (29.1, -1.1), depth=6 )
print
print str(idx1)
print idx1.point()
print idx1.bbox()

bbox = gi.Geoindex( (idx1.bbox()[0], idx1.bbox()[1]) ) + gi.Geoindex( (idx1.bbox()[2], idx1.bbox()[3]) )

print str(bbox)

c1 = gi.Geoindex( (idx1.bbox()[0], idx1.bbox()[1]) )
c2 = gi.Geoindex( (idx1.bbox()[2], idx1.bbox()[3]) )


print str(c1)
print str(c2)

print idx1 > c2
print idx1 < c1
